﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace BIM_WPF
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void On_VoxelAll_Click(object sender, RoutedEventArgs e)
        {
            VoxelAllWindow voxelWnd = new VoxelAllWindow();
            voxelWnd.ShowDialog();
        }

        private void On_RepDet_Click(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
            DialogResult result = folderBrowserDialog.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.OK)
            {
                InteropInterface.OpRepDet(folderBrowserDialog.SelectedPath);
                System.Windows.MessageBox.Show("检测完成!", "结果");
                //PathResultLabel.Text = folderBrowserDialog.SelectedPath;
            }
        }

        private void On_TriCount_Click(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
            DialogResult result = folderBrowserDialog.ShowDialog();
            if (result == System.Windows.Forms.DialogResult.OK)
            {
                InteropInterface.TriCount(folderBrowserDialog.SelectedPath);
                //PathResultLabel.Text = folderBrowserDialog.SelectedPath;
            }
        }

        private void On_IFC_Click(object sender, RoutedEventArgs e)
        {
            ExportWindow exportWindow = new ExportWindow();
            exportWindow.ShowDialog();
        }

        private void On_REVIT_Click(object sender, RoutedEventArgs e)
        {

        }
    }
}
